

package com.hazelcast.internal.dynamicconfig;

import com.hazelcast.config.CacheSimpleConfig;
import com.hazelcast.config.MapConfig;
import com.hazelcast.config.UserCodeNamespaceConfig;

/**
 * Listener to be notified about various events in {@link ClusterWideConfigurationService}
 */
public interface DynamicConfigListener {
    /**
     * Called when a {@link ClusterWideConfigurationService} is initialized. It allows to hook custom hooks.
     */
    void onServiceInitialized(ClusterWideConfigurationService configurationService);

    /**
     * Called when a new {@link MapConfig} object is created locally.
     */
    void onConfigRegistered(MapConfig configObject, UserCodeNamespaceConfig ns);

    /**
     * Called when a new {@link com.hazelcast.config.CacheSimpleConfig} object is created locally.
     */
    void onConfigRegistered(CacheSimpleConfig configObject, UserCodeNamespaceConfig ns);

    /**
     * Called when a {@link com.hazelcast.config.UserCodeNamespaceConfig} object is created locally.
     */
    void onConfigRegistered(UserCodeNamespaceConfig configObject);

}
